package com.ssy.lingxi.contract.model.bo.sign;

import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 合同参数填充bo
 * @author yzc
 * @version 2.0.0
 * @date 2020/11/26
 */
@Data
public class ContractParamFillBO {

    /**
     * 甲方信息
     */
    private ContractParamMemberFillBO leadingContractFillParam;
    /**
     * 乙方信息
     */
    private ContractParamMemberFillBO laborContractFillParam;

    /**
     * 甲方收货地址
     */
    private String buyerContractName;
    private String buyerContractMobile;
    private String buyerReceiveAddress;

    /**
     * 订单信息
     */
    private OrderBO orderBO;

    public static ContractParamFillBO build() {
        ContractParamFillBO param = new ContractParamFillBO();

        ContractParamMemberFillBO leadingMemberParam = new ContractParamMemberFillBO();
        leadingMemberParam.setOrgName("广州张三网络科技有限公司");
        leadingMemberParam.setRepName("张三");
        leadingMemberParam.setMobile("13250151358");
        leadingMemberParam.setAddress("广州市海珠区新港东路1068");
        leadingMemberParam.setBankName("中国工商银行广州粤秀支行");
        leadingMemberParam.setBankCardNo("3602015009201436525");
        leadingMemberParam.setBankAccount("广州张三网络科技有限公司");

        ContractParamMemberFillBO laborMemberParam = new ContractParamMemberFillBO();
        laborMemberParam.setOrgName("广州李四网络科技有限公司");
        laborMemberParam.setRepName("李四");
        laborMemberParam.setMobile("13250151359");
        laborMemberParam.setAddress("广州市海珠区新港东路1069");
        laborMemberParam.setBankName("中国工商银行广州粤秀支行");
        laborMemberParam.setBankCardNo("3602015009201436526");
        laborMemberParam.setBankAccount("广州李四网络科技有限公司");


        param.setLeadingContractFillParam(leadingMemberParam);
        param.setLaborContractFillParam(laborMemberParam);
        param.setBuyerContractName("张三");
        param.setBuyerContractMobile("13250151358");
        param.setBuyerReceiveAddress("广州市海珠区新港东路1068号605房");

        List<OrderProductBO> goodsList = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            OrderProductBO orderProduct = new OrderProductBO();
            orderProduct.setBrand("品牌");
            orderProduct.setProduct("商品");
            orderProduct.setModel("规格");
            orderProduct.setCount(0D);
            orderProduct.setPrice(BigDecimal.ZERO);
            orderProduct.setAmount(BigDecimal.ZERO);
            orderProduct.setTotal(BigDecimal.ZERO);
            orderProduct.setRemark("备注");
            goodsList.add(orderProduct);

        }

        OrderBO orderBO = new OrderBO();
        orderBO.setOrderProductList(goodsList);
        orderBO.setProductAmount(new BigDecimal("987654321"));
        orderBO.setFreightAmount(new BigDecimal("987654321"));
        orderBO.setTotalAmount(new BigDecimal("987654321"));

        param.setOrderBO(orderBO);

        return param;
    }
}
